<template>
	<view class="search-container" :style="{'background-color':bgcolor}" @click="searchHandler">
	<view class="search-box" :style="{'border-radius':radius+'px'}">
		<uni-icons type='search' size='20' >
		</uni-icons>
		<text class="placeholder"> 搜索</text>
	</view>
	</view>
</template>

<script>
	export default {
		name:"mysearch",
		props:{
			bgcolor:{
				type:String,
				default:'#c00000'
			},
				
			radius:{
				type:Number,
				default:18
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			searchHandler(){
				// console.log('24242')
				this.$emit('myclick')
			}
		}
	}
</script>

<style lang="scss">
	
	
.search-container{
	// background-color: #c00000;
	height: 50px;
	display: flex;
	align-items: center;
	padding: 0px 10px;
	.search-box{
		display: flex;
		align-items: center;
		justify-content: center;
		height: 30px;
		// border-radius: 18px;
		background-color: #fff;
width: 100%;
padding: 0 10px;
.placeholder{
	margin: 0 10px;
}
	}
}
</style>